package chap10

object ElementTest {
  def main(args : Array[String]) : Unit = {
    
    var table = Element(" ", Justify("right"))
    for(i <- 1 to 10) {
      var column = Element(i.toString, Justify("right"))
      for(j <- 2 to 10) {
        // above
        column = column above Element(" "+(i * j).toString, Justify("right"))
      }
      //beside
      table = table beside column
    }
    
    print(table.toString)
    
  }
}
